package com.example.superoa.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the tscene database table.
 * 
 */
@Entity
@NamedQuery(name="Tscene.findAll", query="SELECT t FROM Tscene t")
public class Tscene implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int tsceneid;

	private int tarrangestatue;

	private String tscenename;

	//bi-directional many-to-one association to Tasmission
	@OneToMany(mappedBy="tscene")
	private List<Tasmission> tasmissions;

	//bi-directional many-to-one association to Tarrange
	@ManyToOne
	@JoinColumn(name="tarrangeid")
	private Tarrange tarrange;

	public Tscene() {
	}

	public int getTsceneid() {
		return this.tsceneid;
	}

	public void setTsceneid(int tsceneid) {
		this.tsceneid = tsceneid;
	}

	public int getTarrangestatue() {
		return this.tarrangestatue;
	}

	public void setTarrangestatue(int tarrangestatue) {
		this.tarrangestatue = tarrangestatue;
	}

	public String getTscenename() {
		return this.tscenename;
	}

	public void setTscenename(String tscenename) {
		this.tscenename = tscenename;
	}

	public List<Tasmission> getTasmissions() {
		return this.tasmissions;
	}

	public void setTasmissions(List<Tasmission> tasmissions) {
		this.tasmissions = tasmissions;
	}

	public Tasmission addTasmission(Tasmission tasmission) {
		getTasmissions().add(tasmission);
		tasmission.setTscene(this);

		return tasmission;
	}

	public Tasmission removeTasmission(Tasmission tasmission) {
		getTasmissions().remove(tasmission);
		tasmission.setTscene(null);

		return tasmission;
	}

	public Tarrange getTarrange() {
		return this.tarrange;
	}

	public void setTarrange(Tarrange tarrange) {
		this.tarrange = tarrange;
	}

}